import request from '@/utils/request'

// 查询容器类型列表
export function listContainerType(query) {
  return request({
    url: '/biobank/containerType/list',
    method: 'get',
    params: query
  })
}

// 根据编码查询子容器
export function listChildren(containerTypeCode) {
  return request({
    url: '/biobank/containerType/listChildren/' + containerTypeCode,
    method: 'get'
  })
}

// 查询容器类型详细
export function getContainerType(containerTypeId) {
  return request({
    url: '/biobank/containerType/' + containerTypeId,
    method: 'get'
  })
}

// 新增容器类型
export function addContainerType(data) {
  return request({
    url: '/biobank/containerType',
    method: 'post',
    data: data
  })
}

// 修改容器类型
export function updateContainerType(data) {
  return request({
    url: '/biobank/containerType',
    method: 'put',
    data: data
  })
}

// 删除容器类型
export function delContainerType(containerTypeId) {
  return request({
    url: '/biobank/containerType/' + containerTypeId,
    method: 'delete'
  })
}
